package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_fun database table.
 * 
 */
@Entity
@Table(name="per_pms_fun")
@NamedQuery(name="PerPmsFun.findAll", query="SELECT p FROM PerPmsFun p")
public class PerPmsFun implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int funid;

	private String fungad;

	private String funname;

	private String funurl;

	//bi-directional many-to-one association to PerPmsPes
	@ManyToOne
	@JoinColumn(name="PESID")
	private PerPmsPes perPmsPe;

	//bi-directional many-to-one association to PerPmsFuns
	@OneToMany(mappedBy="perPmsFun")
	private List<PerPmsFuns> perPmsFuns;

	//bi-directional many-to-one association to PerPmsYG
	@OneToMany(mappedBy="perPmsFun")
	private List<PerPmsYG> perPmsYGs;

	//bi-directional many-to-one association to PerPmsZG
	@OneToMany(mappedBy="perPmsFun")
	private List<PerPmsZG> perPmsZGs;

	public PerPmsFun() {
	}

	public int getFunid() {
		return this.funid;
	}

	public void setFunid(int funid) {
		this.funid = funid;
	}

	public String getFungad() {
		return this.fungad;
	}

	public void setFungad(String fungad) {
		this.fungad = fungad;
	}

	public String getFunname() {
		return this.funname;
	}

	public void setFunname(String funname) {
		this.funname = funname;
	}

	public String getFunurl() {
		return this.funurl;
	}

	public void setFunurl(String funurl) {
		this.funurl = funurl;
	}

	public PerPmsPes getPerPmsPe() {
		return this.perPmsPe;
	}

	public void setPerPmsPe(PerPmsPes perPmsPe) {
		this.perPmsPe = perPmsPe;
	}

	public List<PerPmsFuns> getPerPmsFuns() {
		return this.perPmsFuns;
	}

	public void setPerPmsFuns(List<PerPmsFuns> perPmsFuns) {
		this.perPmsFuns = perPmsFuns;
	}

	public PerPmsFuns addPerPmsFun(PerPmsFuns perPmsFun) {
		getPerPmsFuns().add(perPmsFun);
		perPmsFun.setPerPmsFun(this);

		return perPmsFun;
	}

	public PerPmsFuns removePerPmsFun(PerPmsFuns perPmsFun) {
		getPerPmsFuns().remove(perPmsFun);
		perPmsFun.setPerPmsFun(null);

		return perPmsFun;
	}

	public List<PerPmsYG> getPerPmsYGs() {
		return this.perPmsYGs;
	}

	public void setPerPmsYGs(List<PerPmsYG> perPmsYGs) {
		this.perPmsYGs = perPmsYGs;
	}

	public PerPmsYG addPerPmsYG(PerPmsYG perPmsYG) {
		getPerPmsYGs().add(perPmsYG);
		perPmsYG.setPerPmsFun(this);

		return perPmsYG;
	}

	public PerPmsYG removePerPmsYG(PerPmsYG perPmsYG) {
		getPerPmsYGs().remove(perPmsYG);
		perPmsYG.setPerPmsFun(null);

		return perPmsYG;
	}

	public List<PerPmsZG> getPerPmsZGs() {
		return this.perPmsZGs;
	}

	public void setPerPmsZGs(List<PerPmsZG> perPmsZGs) {
		this.perPmsZGs = perPmsZGs;
	}

	public PerPmsZG addPerPmsZG(PerPmsZG perPmsZG) {
		getPerPmsZGs().add(perPmsZG);
		perPmsZG.setPerPmsFun(this);

		return perPmsZG;
	}

	public PerPmsZG removePerPmsZG(PerPmsZG perPmsZG) {
		getPerPmsZGs().remove(perPmsZG);
		perPmsZG.setPerPmsFun(null);

		return perPmsZG;
	}

}